<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<ui:composition  xmlns="http://www.w3.org/1999/xhtml"
    xmlns:ui="http://java.sun.com/jsf/facelets"
    xmlns:h="http://java.sun.com/jsf/html"
    xmlns:f="http://java.sun.com/jsf/core"
    xmlns:rich="http://richfaces.org/rich"
    xmlns:c="http://java.sun.com/jstl/core"
    xmlns:a4j="http://richfaces.org/a4j" template="layouts/layout.xhtml"
   >
   <ui:define name="content">
<h:form>
<rich:panel>
        <f:facet name="header">
            <h:outputText value="New Location "></h:outputText>
        </f:facet>
        <rich:panel id="AddLocationPanel">
        <h:panelGrid columns="3">
            <h:outputText value="Name: "/>
            <rich:inplaceInput  id="locationAdd" required="true" value="#{wsLocationController.model.name}"  defaultLabel="Enter stock location" minInputWidth="150px;" />
              <rich:message  for="locationAdd">
                        <f:facet name="errorMarker">
                           
                        </f:facet>
                    </rich:message>
                    
             <h:outputText value="Alias:" />
            <rich:inplaceInput value="#{wsLocationController.model.alias}" defaultLabel="Enter stock Alias"/>
            
            <rich:message  for="locationalias">
                        <f:facet name="errorMarker">
                           
                        </f:facet>
                    </rich:message>
            
            <h:outputText value="Code: "/>
            <rich:inplaceInput value="#{wsLocationController.model.code}" defaultLabel="Enter location Code "/>
            
            <rich:message  for="locationcode">
                        <f:facet name="errorMarker">
                           
                        </f:facet>
                    </rich:message>
             <h:outputText value="Address: "/>
            <rich:inplaceInput value="#{wsLocationController.model.address}" defaultLabel="Enter location Code "/>
            
            <rich:message  for="locationaddress">
                        <f:facet name="errorMarker">
                           
                        </f:facet>
                    </rich:message>
            <h:outputText value="Currently in Useful State :" />
            <h:selectBooleanCheckbox value="#{wsLocationController.model.currentlyInUse}"/>
            <rich:message  for="locationinuse">
                        <f:facet name="errorMarker">
                           
                        </f:facet>
                    </rich:message>
            
     </h:panelGrid>
     </rich:panel>
       <a4j:commandButton id="addLocation" type="submit" actionListener="#{wsLocationController.addLocation}" value="Save Location" render="AddLocationPanel"  />
      </rich:panel>
</h:form>
</ui:define>
</ui:composition>
